<%@ page import="java.util.List"%>
<%@ page import="algutil.texte.ConversionTexte"%>
<%@ page import="gmusic.ma.bo.ReleaseMABean"%>
<%@ page import="gmusic.ma.bo.ArtistMABean"%>

<jsp:include page="include/entete.jsp" flush="true">
	<jsp:param name="titre" value="Metal Archives" />
	<jsp:param name="sousTitre" value="Liste des releases" />
</jsp:include>

<%
	ArtistMABean artist = (ArtistMABean) session
			.getAttribute("currentArtist");
	List<ReleaseMABean> releases = (List<ReleaseMABean>) session
			.getAttribute("releases");
%>

<br />
<b>/<a href="GMusic?cmd=AfficherArtistsMA">Artistes Metal
Archives</a></b>
<br />

<div class="table">
<table border="0" width="100%">
	<THEAD>

		<TR class="thead">
			<TH colspan="5"><%=artist.getNom().toUpperCase()%></TH>
		</TR>
		<TR class="thead">
			<TH>MAID</TH>
			<TH>Releases</TH>
			<th colspan="2">Actions</th>
			<th>GMusic</th>
		</TR>
	</THEAD>
	<tbody>
		<%
			String[] ligneCouleur = new String[] { "ligne1", "ligne2" };

			for (int i = 0; i < releases.size(); i++) {
		%>
		<tr class="<%=ligneCouleur[i % 2]%>">
			<td>[<%=releases.get(i).getMaid()%>]</td>
			<td
				class="<%=releases.get(i).getTypeId() == 1 ? "full_release"
								: "not_full_release"%>"><a
				href="GMusic?cmd=AfficherTracksMA&maid=<%=releases.get(i).getMaid()%>"><%=releases.get(i).getAnnee()%>
			<%=ConversionTexte.capitalize(releases.get(i).getNom())%></a></td>
			<td align="center"><img src="images/modifier.gif" /></td>
			<td align="center"><img src="images/supprimer.gif" /></td>
			<td align="center"><%=releases.get(i).existsInGM() ? ""
								: artist.existsInGM() ? "<a href=\"GMusic?cmd=AjouterReleaseDepuisMA&maid="
										+ releases.get(i).getMaid() + "\">Add"
										: "&nbsp;"%></td>
		</tr>
		<%
			}
		%>
	</tbody>
	<tfoot>
		<tr class="tfoot">
			<td colspan="5"><%=releases.size()%> enregistrement(s)</td>
		</tr>
	</tfoot>
</table>
</div>

<jsp:include page="include/piedPage.jsp" flush="true" />
